

export function selectymd() {
    return [{ label: "年", value: "年" }, { label: "月", value: "月" }, { label: "日", value: "日" }];
}

export function selectym() {
    return [{ label: "年", value: "年" }, { label: "月", value: "月" }];
}

/*隐患模块 start */
export function riskStatusOptions() {
    return [
        { label: "未提交", value: -1 },
        { label: "进行中", value: 0 },
        { label: "已完成", value: 1 },
        { label: "未完成", value: 2 },
    ]
}

export function getriskStatus(value) {
    var label = "";
    var list = riskStatusOptions();
    for (var i = 0; i < list.length; i++) {
        if (list[i].value == value) {
            label = list[i].label;
            break;
        }
    }
    return label;
}

export function selectPossibilityOptions() {
    return [
        { label: "极不可能", value: 1 },
        { label: "非常不可能", value: 2 },
        { label: "不可能", value: 3 },
        { label: "可能", value: 4 },
    ]
}
export function selectSeriousnessOptions() {
    return [
        { label: "轻微的", value: 1 },
        { label: "中等的", value: 2 },
        { label: "严重的", value: 3 },
        { label: "灾难性的", value: 4 },
    ]
}
export function selectManageCategoryOptions() {
    return [
        { label: "其它隐患", value: "0" },
        { label: "主要负责人登记隐患", value: "1" },
        { label: "技术负责人登记隐患", value: "2" },
        { label: "操作负责人登记隐患", value: "3" },
    ]
}
export function selectManageLevelOptions() {
    return [
        { label: "集团级", value: "1" },
        { label: "公司级", value: "2" },
        { label: "车间级", value: "3" },
        { label: "班组级", value: "4" },
    ]
}

export function selectManagetypeOptions() {
    return [{
        label: "即查即改",
        value: "即查即改",
    }, {
        label: "限期整改",
        value: "限期整改",
    }, {
        label: "停车整改",
        value: "停车整改",
    }];
}

export function selectgradeOptions() {
    return [
        { label: "一般隐患", value: "一般隐患", type: "1" },
        { label: "重大隐患", value: "重大隐患", type: "2" },
    ]
}

export function selectowntype() {
    return [
        { label: "通用", value: "A" },
        { label: "行业专属", value: "B" },
    ]
}
/*隐患模块 end */

/*承包商模块 start */
export function selectapplyOptions() {
    return [
        { label: "未申请", value: '0' },
        { label: "申请中", value: '1' },
        { label: "未通过", value: '2' },
        { label: "已通过", value: '3' },
    ];
}

export function selectnaturalOptions() {
    return [
        { label: "有", value: '1' },
        { label: "无", value: '2' },
        { label: "不适用", value: '3' }
    ];
}
/*承包商模块 end */

/*教育培训模块 start */
export function selectcoursetype() {
    return [
        { label: "系统课程", value: '1' },
        { label: "自制课程", value: '2' }
    ];
}

export function selectquestiontype() {
    return [{ label: "单选题", value: "single" }, { label: "多选题", value: "multi" }, { label: "判断题", value: "judge" }];
}

export function selectqsdata() {
    return [
        { name: 'A' },
        { name: 'B' },
        { name: 'C' },
        { name: 'D' },
        { name: 'E' },
        { name: 'F' },
        { name: 'G' },
        { name: 'H' },
        { name: 'I' },
        { name: 'J' },
        { name: 'K' },
        { name: 'L' },
        { name: 'M' },
        { name: 'N' },
        { name: 'O' },
        { name: 'P' },
        { name: 'Q' },
        { name: 'R' },
        { name: 'S' },
        { name: 'T' },
        { name: 'U' },
        { name: 'V' },
        { name: 'W' },
        { name: 'X' },
        { name: 'Y' },
        { name: 'Z' }
    ]
}

export function selectplannum() {
    return [
        { name: '隐患排查内容' },
        { name: '隐患排查内容1' },
        { name: '隐患排查内容2' },
        { name: '隐患排查内容3' },
        { name: '隐患排查内容4' },
        { name: '隐患排查内容5' },
        { name: '隐患排查内容6' },
        { name: '隐患排查内容7' },
        { name: '隐患排查内容8' },
        { name: '隐患排查内容9' },
        { name: '隐患排查内容10' },
        { name: '隐患排查内容11' },
        { name: '隐患排查内容12' },
        { name: '隐患排查内容13' },
        { name: '隐患排查内容14' },
        { name: '隐患排查内容15' },
        { name: '隐患排查内容16' },
        { name: '隐患排查内容17' },
        { name: '隐患排查内容18' },
        { name: '隐患排查内容19' },
        { name: '隐患排查内容20' },
        { name: '隐患排查内容21' },
        { name: '隐患排查内容22' },
        { name: '隐患排查内容23' },
        { name: '隐患排查内容24' },
        { name: '隐患排查内容25' },
        { name: '隐患排查内容26' },
        { name: '隐患排查内容27' },
        { name: '隐患排查内容28' },
        { name: '隐患排查内容29' },
        { name: '隐患排查内容30' },
        { name: '隐患排查内容31' },
        { name: '隐患排查内容32' },
        { name: '隐患排查内容33' },
        { name: '隐患排查内容34' },
        { name: '隐患排查内容35' },
        { name: '隐患排查内容36' },
        { name: '隐患排查内容37' },
        { name: '隐患排查内容38' },
        { name: '隐患排查内容39' },
        { name: '隐患排查内容40' },
        { name: '隐患排查内容41' },
        { name: '隐患排查内容42' },
        { name: '隐患排查内容43' },
        { name: '隐患排查内容44' },
        { name: '隐患排查内容45' },
        { name: '隐患排查内容46' },
        { name: '隐患排查内容47' },
        { name: '隐患排查内容48' },
        { name: '隐患排查内容49' }
    ]
}

export function selectchecknum() {
    return [
        { name: '检修内容' },
        { name: '检修内容1' },
        { name: '检修内容2' },
        { name: '检修内容3' },
        { name: '检修内容4' },
        { name: '检修内容5' },
        { name: '检修内容6' },
        { name: '检修内容7' },
        { name: '检修内容8' },
        { name: '检修内容9' },
        { name: '检修内容10' },
        { name: '检修内容11' },
        { name: '检修内容12' },
        { name: '检修内容13' },
        { name: '检修内容14' },
        { name: '检修内容15' },
        { name: '检修内容16' },
        { name: '检修内容17' },
        { name: '检修内容18' },
        { name: '检修内容19' },
        { name: '检修内容20' },
        { name: '检修内容21' },
        { name: '检修内容22' },
        { name: '检修内容23' },
        { name: '检修内容24' },
        { name: '检修内容25' },
        { name: '检修内容26' },
        { name: '检修内容27' },
        { name: '检修内容28' },
        { name: '检修内容29' },
        { name: '检修内容30' },
        { name: '检修内容31' },
        { name: '检修内容32' },
        { name: '检修内容33' },
        { name: '检修内容34' },
        { name: '检修内容35' },
        { name: '检修内容36' },
        { name: '检修内容37' },
        { name: '检修内容38' },
        { name: '检修内容39' },
        { name: '检修内容40' },
        { name: '检修内容41' },
        { name: '检修内容42' },
        { name: '检修内容43' },
        { name: '检修内容44' },
        { name: '检修内容45' },
        { name: '检修内容46' },
        { name: '检修内容47' },
        { name: '检修内容48' },
        { name: '检修内容49' }
    ]
}

export function selectquestionlevel() {
    return [{ label: "简单", value: "1" }, { label: "普通", value: "2" }, { label: "困难", value: "3" }];
}

export function selectplantype() {
    return [{ label: "培训-练习-考试", value: "1" }, { label: "练习-考试", value: "2" }, { label: "培训-考试", value: "3" }, { label: "培训-练习", value: "4" }, { label: "考试", value: "5" }, { label: "练习", value: "6" }, { label: "培训", value: "7" }];
}
export function planStatusOptions() {
    return [{ label: "未发布", value: 0 }, { label: "未开始", value: 1 }, { label: "进行中", value: 2 }, { label: "已结束", value: 3 }];
}

export function selectleveltype() {
    return [{ label: "日常安全培训", value: "common" }, { label: "公司级", value: "gsj" }, { label: "部门级", value: "bmj" }, { label: "岗位级", value: "gwj" }];
}
/*教育培训模块 end */

/*双重预防机制 start */
export function selectsafetyanalysis_possibility() {
    return [
        { label: "极不可能", value: 1 },
        { label: "非常不可能", value: 3 },
        { label: "不可能", value: 6 },
        { label: "可能", value: 10 }
    ];
}

export function selectsafetyanalysis_seriousness() {
    return [
        { label: "轻微的", value: 1 },
        { label: "中等的", value: 4 },
        { label: "严重的", value: 7 },
        { label: "灾难性的", value: 15 }
    ];
}

export function selectsafetyanalysis_risklevel() {
    return [
        { label: "低安全风险", value: 1 },
        { label: "一般安全风险", value: 2 },
        { label: "较大安全风险", value: 3 },
        { label: "重大安全风险", value: 4 }
    ];
}

export function selectcycletype() {
    return [
        { label: "日", value: "day" },
        { label: "月", value: "month" },
        { label: "年", value: "year" }
    ];
}

export function selectplanrecord() {
    return [{ label: "未检查", value: 0 }, { label: "已落实", value: 1 }, { label: "有隐患", value: 2 }];
}
/*双重预防机制 end */

export function getparamid(obj, id) {
    var entity = null;
    for (var i = 0; i < obj.length; i++) {
        if (obj[i].id == id) {
            entity = obj[i];
            break;
        }
    }
    return entity;
}


export function getparamvalue(obj, value) {
    var entity = null;
    for (var i = 0; i < obj.length; i++) {
        if (obj[i].value == value) {
            entity = obj[i];
            break;
        }
    }
    return entity;
}

export function getparamname(obj, name) {
    var entity = null;
    for (var i = 0; i < obj.length; i++) {
        if (obj[i].name == name) {
            entity = obj[i];
            break;
        }
    }
    return entity;
}

export function getparamcode(obj, code) {
    var entity = null;
    for (var i = 0; i < obj.length; i++) {
        if (obj[i].code == code) {
            entity = obj[i];
            break;
        }
    }
    return entity;
}


export function selectrcWorktype() {
    return [{ label: "日常任务", value: "0" }]
};

export function selectbbWorktype() {
    return [
        { label: "主要负责人任务", value: "1" },
        { label: "技术负责人任务", value: "2" },
        { label: "操作负责人任务", value: "3" },
    ]
}

export function selectisdanger() {
    return [{
        value: "1",
        name: "是",
    },
    {
        value: "0",
        name: "否",
    }];
}

export function selectreportStatus() {
    return [
        { label: "未上传", value: 0 },
        { label: "失败", value: 1 },
        { label: "成功", value: 2 },
    ]
}

export function getreportStatus(value) {
    var label = "";
    var liststatus = selectreportStatus();
    for (var i = 0; i < liststatus.length; i++) {
        if (liststatus[i].value == value) {
            label = liststatus[i].label;
        }
    }
    return label;
}

export function selectcheckworkStatus() {
    return [
        { label: "未提交", value: -1 },
        { label: "审核中", value: 0 },
        { label: "审核不通过", value: 1 },
        { label: "检修中", value: 2 },
        { label: "验收中", value: 3 },
        { label: "验收不合格", value: 4 },
        { label: "已完成", value: 5 }
    ]
}

export function selectcheckType() {
    return [{
        label: "企业自查",
        value: 1
    }, {
        label: "市级及以下检查",
        value: 2
    }, {
        label: "省级检查",
        value: 3
    }, {
        label: "部级检查",
        value: 4
    }];
}

export function selectharmType() {
    return [{
        label: "事故隐患",
        value: 1
    }, {
        label: "火灾隐患",
        value: 2
    }];
}

export function selectresultStatus() {
    return [{
        label: "正常",
        value: 0
    }, {
        label: "停业整顿",
        value: 1
    }];
}